//
// Created by wze-zero on 2024/7/12 012.
//
#include <iostream>

using namespace std;

int main() {
    string s;
    cin >> s;
    int a = 0, b = 0, c = 0;
    for (int i = 0; i < s.length(); ++i) {
        switch (s.at(i)) {
            case 'a':
                a++;
                break;
            case 'b':
                b++;
                break;
            case 'c':
                c++;
                break;
            default:
                break;
        }
    }
    cout << a << " " << b << " " << c << endl;
    return 0;
}